Class CMSGateway

java.lang.Object
com.netscape.cms.servlet.common.CMSGateway

public class CMSGateway extends Object
This class is to hold some general method for servlets.
  • Field Details

  • Constructor Details

    • CMSGateway

      public CMSGateway()
  • Method Details

    • getCMSEngine

      public CMSEngine getCMSEngine()
    • setCMSEngine

      public void setCMSEngine(CMSEngine engine)
    • init

      public void init() throws Exception
      Throws:
      Exception
    • toHashtable

      public Hashtable<String,String> toHashtable(javax.servlet.http.HttpServletRequest req)
    • getEnableAdminEnroll

      public boolean getEnableAdminEnroll()
    • setEnableAdminEnroll

      public void setEnableAdminEnroll(boolean enableAdminEnroll) throws EBaseException
      Throws:
      EBaseException
    • disableAdminEnroll

      public void disableAdminEnroll() throws EBaseException
      Throws:
      EBaseException
    • getAuthCreds

      public AuthCredentials getAuthCreds(AuthManager authMgr, ArgBlock argBlock, X509Certificate clientCert) throws EBaseException
      construct a authentication credentials to pass into authentication manager.
      Throws:
      EBaseException
    • checkAuthManager

      public AuthToken checkAuthManager(javax.servlet.http.HttpServletRequest httpReq, ArgBlock httpParams, X509Certificate cert, String authMgrName) throws EBaseException
      Throws:
      EBaseException
    • renderTemplate

      public void renderTemplate(String templateName, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, javax.servlet.ServletConfig servletConfig, CMSFileLoader fileLoader) throws EBaseException, IOException
      Throws:
      EBaseException
      IOException
    • getLocale

      public Locale getLocale(String lang)
    • getLangFile

      public File getLangFile(javax.servlet.http.HttpServletRequest req, File realpathFile, Locale[] locale) throws IOException
      Parameters:
      req - http servlet request
      realpathFile - the file to get.
      locale - array of at least one to be filled with locale found.
      Throws:
      IOException
    • getTemplate

      protected CMSTemplate getTemplate(String templateName, javax.servlet.http.HttpServletRequest httpReq, javax.servlet.ServletConfig servletConfig, CMSFileLoader fileLoader, Locale[] locale) throws EBaseException, IOException
      get a template
      Throws:
      EBaseException
      IOException
    • modifiedSince

      public boolean modifiedSince(javax.servlet.http.HttpServletRequest req, long lastModified)
      Get the If-Modified-Since header and compare it to the millisecond epoch value passed in. If there is no header, or there is a problem parsing the value, or if the file has been modified this will return true, indicating the file has changed.
      Parameters:
      lastModified - The time value in milliseconds past the epoch to compare the If-Modified-Since header to.